function initFileInput(ctrlName,uploadUrl){
	var control = $('#' + ctrlName);
	
	control.fileinput({
		language: 'zh', //设置语言
        uploadUrl: uploadUrl, //上传的地址
        allowedFileExtensions : ['jpg', 'png','gif'],//接收的文件后缀
        showUpload: false, //是否显示上传按钮
        showCaption: false,//是否显示标题
        browseClass: "btn btn-primary", //按钮样式             
        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>", 
	});
}

initFileInput("file-Portrait", "/User/EditPortrait");